package com.yuntsg.ruiijn.paperana.test;

import lombok.SneakyThrows;

import java.util.List;

import static com.yuntsg.ruiijn.paperana.service.ArticleRepeatSummary.pdfToSentenceWordsRuijinTest;
import static com.yuntsg.ruiijn.paperana.service.ArticleRepeatSummary.pdfToTxtRuijin;

public class PDFtoTxt {
    @SneakyThrows
    public static void main(String[] args) {

        String filePath = "D:\\Users\\55419\\Desktop\\test\\";
        // pdf 拆分句子测试 一篇中文的 一篇国自然 一篇英文
        String aFileName = "帕金森病患者前庭诱发肌源性衡障碍及非运动症状的相关性_王阳.pdf";
//        String aFileName = "国自然基金.pdf";
//        String aFileName = "qwe1.pdf";


        List<String> strings = pdfToTxtRuijin(filePath, filePath + aFileName);
//        if (StrUtils.isRuiJin()) {
////            List<Change.TableField> tableFields = exRuijin(strings);
////            strings = tableFields.stream().map(o -> o.getStr()).collect(Collectors.toList());
//        }
        List<List<String>> aSentenceList;
        aSentenceList = pdfToSentenceWordsRuijinTest(strings);
//        if (StrUtils.isRuiJin()) {
//
//        } else {
//            aSentenceList = pdfToSentenceWords(strings);
//        }
        for (List<String> stringList : aSentenceList) {
            System.out.println(stringList);
        }

    }
}
